- I tested Roomba's most functional robot vacuum yet, and it's worth every penny
- This thermal camera is my favorite smartphone accessory and it's on sale at Amazon
- "모든 임직원이 동요 중" 팻 겔싱어의 갑작스러운 퇴임을 보는 시선
- I found the AirTags that Android users have been waiting for and they're on sale
- These $70 wireless earbuds are my go-to recommendation for audiophiles on a budget
What is an IP address? And what is your IP address?
Each packet crossing TCP/IP networks is homing in on an IP address that identifies the device that sent it but also contains information so it can be successfully routed where it needs to go.
IP address defined
An IP address is a number used to label any device connected to a network on which the Internet Protocol is used as the medium for communication. Internet Protocol is where the IP in IP address comes from; it was developed in the 1970s and is the cornerstone of the internet protocol suite, which defines everything about how devices on the internet exchange information.
The IP address is, in turn, one of the cornerstones of the Internet Protocol. Information is transmitted over the network in discrete chunks called packets; each packet is mostly made up of whatever data the sender is trying to communicate, but also includes a header, consisting of metadata about that packet.
Among other pieces of data stored in the packet header are the IP address of the device that sent the packet and the IP address of device where the packet is heading. Routers and other network infrastructure use this information to make sure the packets get to where they’re supposed to go.
DNS: Matching domain names to IP addresses
Many (though not all) internet-connected computers also have human-readable addresses that may include words and are known as domain names such as networkworld.com, for example. The Domain Name System, or DNS, is another part of the Internet protocol suite, and it makes sure that requests made using domain names reach the correct IP address. You can think of DNS as representing a more user-friendly layer on top of the IP-address infrastructure.
However, the IP address remains the fundamental way that internet-connected devices are found, and in some circumstances a domain name can correspond to multiple servers with different IP addresses
IP address versions: IPv4 and IPv6
There are two versions of IP addresses: IPv4 and IPv6, and they have different formats, the major difference between them being that it’s possible to create vastly more unique IPv6 addresses (2128) than IPv4 addresses (232).
That’s thanks to the format they use. IPv4 addresses are written in four parts separated by dots like this:
45.48.241.198
Each part written in conventional Base 10 numerals represents an eight-bit binary number from 0 to 255.
Each of these four numbers separated by dots is written in standard decimal notation. But computers fundamentally deal with numbers in binary (using just zeroes and ones, and each of the numbers in an IPv4 address represents an 8-bit binary number, which means that none of them can be higher than 255 (111111 in binary).
It’s quite likely that you’ve seen IP addresses like that one before since they’ve been around since 1983. The newer version of the protocol, IPv6, is slowly displacing IPv4, and its addressing looks like this:
2620:cc:8000:1c82:544c:cc2e:f2fa:5a9b
Note that instead of four numbers, there are eight, and they’re separated by colons rather than commas. And yes, they are all numbers. There are letters in there because IPv6 addresses are written in hexadecimal (Base 16) notation, which means 16 different symbols are required to uniquely represent Base 10 numbers 1-16. The ones used are numerals 0-9 plus letters A-F. Each of these numbers represents a 16-bit binary number, and the difference between that the 8-bit components of an IPv4 address is the main reason for IPv6’s existence.
IPv4 addresses are 32-bit numbers, and the total number of possible addresses of that length is the 232 mentioned above—about 4.3 billion. That’s number that seemed ample in the early days of the internet but began to loom as a potential crisis as internet-connected devices multiplied. IPv6 addresses are 128-bit numbers, which means that there are 2128 possible addresses, a number that we’re not going to bother writing out because it’s 39 digits long, but it’s called 340 undecillion.
The anxiety that IPv4 addresses were going to run out is what drove the development of IPv6. But in practice IPv4 addresses are still widely used and not that hard to come by. This has to do with how IP addresses are assigned to network-connected devices and how private networks can be created with their own restricted set of IP addresses, as we’ll discuss in the next two sections.
How are IP addresses assigned?
As the International Assigned Numbers Authority (IANA) puts it, “Both IPv4 and IPv6 addresses are generally assigned in a hierarchical manner,” and IANA is at the top of the hierarchy. IANA assigns blocks of IP addresses to regional internet registries (you can see which address ranges go with which regions here). The regional registries in turn assign smaller blocks to national registries, and so on down the line, with blocks eventually being assigned to individual internet service providers (ISP), which in this context include mobile phone companies. It’s the ISPs that assign specific IP addresses to individual devices, and there are a couple of ways they can do this.
Static vs. dynamic IP addresses and DHCP
A static IP address is one that’s been assigned by an ISP to a device and is guaranteed to remain constant. If your computer’s address is 45.48.241.198, it will stay that way as long as you want it to. Static IP addresses are important for devices that need to be easily found on the internet, like web servers or gaming servers. Generally speaking, an ISP will charge a customer extra for an assigned static IP address.
From the perspective of the ISP, which has a limited number of IPv4 addresses to hand out, one downside of leasing a static address is that the address is unavailable to anyone else. But the huge majority of end users only need an address when they’re actually accessing the internet. For those users, ISPs assign dynamic IP addresses, basically handing out a new address to a device every time it connects to the network, and putting that address back into a pool of available addresses when the device disconnects. This technique helps conserve IP addresses. If an ISP has a million customers but only half are online at given time, the ISP doesn’t need a million addresses in its pool.
For IPv4 networks, the process of assigning IP addresses dynamically is governed by the Dynamic Host Configuration Protocol, (DHCP), which, among other things, automates most of the process and ensures that no two devices are assigned the same address at the same time.
IPv6 was designed to support stateless IP address autoconfiguration (SLAAC), in which a device itself essentially grabs an address from the available pool when it connects to the network. However, there’s also DHCPv6, an updated version of the DHCP protocol that keeps more control in the hands of network providers.
Public vs. private IP addresses
So far, we’ve been talking about IP addresses and potentially running out of them as if there were one set of addresses for the entire planet, with no repeats. But that’s not strictly true. In fact, it’s probably not true for most devices you use in a day-to-day basis and not all of the 4.3 billion IPv4 addresses are available to publicly connected devices.
A typical home or corporate network connects to the public internet via a router, and it’s this router that’s assigned an IP address by the ISP. From the perspective of the outside world, all traffic from devices on that local network are coming from that public IP address; but inside the network, each device (including the router) has a local private IP address, usually assigned by the router via DHCP.
These addresses are considered private because they’re only used for directing packets within the local, private network, and can’t be seen by anyone outside the network. As result, the same IP address can be used on an infinite number of private networks without causing confusion. In fact, there are blocks of IP addresses specifically set aside for use on these private networks. (For small home networks, addresses starting with 192.168 are quite common.)
The job of the router is to alter the origin and destination IP addresses in each packet’s headers as needed as it passes between the private network and the public internet, a process known as network address translation, or NAT. There are several methods for doing this. One common way is to associate each device on the internal network with a network port that is listed in the packet header. That port information determines the final destinations of incoming packets that have all been addressed to the public-facing IP address assigned to the router.
This discussion is specific to IPv4 addresses, and the boom in local networks has been in a big factor in staving off a total IPv4 address drought even as network-connected devices multiply in every home. IPv6 addresses, on the other hand, are so plentiful that it’s assumed that these kinds of private networks will be unnecessary after universal IPv6 adoption. However, if you want to set up a private internal IPv6 network that connects to the internet via IPv4, there are also private IPv6 address ranges you can use.
Subnetting and subnet masks
IP addresses are hierarchical. In general, the numbers to the left tell you what network the device with that IP address is on, whereas the numbers to the right identify the specific device. However, the Internet Protocol doesn’t define where the dividing line is; in addition, some of the bits in an address may be used to identify a subnetwork, or subnet.
Routers determine what parts of an IP address refer to networks, subnets, and devices by use of a subnet mask. In IPv4, a network mask is an 8-bit number like a standard IP address, though with all of its ones on the left and all of its zeroes on the right; in essence, the dividing line between the ones and zeroes defines the divide within an IP address in the address space the subnet mask refers to. The nitty-gritty here is fairly detailed and involves binary bitwise operations. (Microsoft has a pretty good explainer.) IPv6, subnetting is much simpler, and mostly involves just slicing digits off of addresses to denote a range of subnetted addresses.
An important thing to keep in mind that is that subnet information isn’t contained in packet headers or known by the source and destination devices. Instead, it’s used by routers and other infrastructure that use the IP addresses into determine how to deliver packets to the right devices on the right physical networks. Through subnetting, for instance, a network admin could take a sequential block of IP addresses and distribute them across three separate physical subnetworks. The packet doesn’t need to know about those subnetworks; the router will use its lookup tables to figure out where to send the packet when the time comes.
What is my IP address?
Since you’re reading this on a networked device, you might wonder what your own IP address is. There are many websites—like, for instance, whatismyipaddress.com, to choose an obvious one—that will tell you, which is easy enough since every network packet you send out to the internet contains that information.
However, if, like most people, you have your device connected to a local network, the result you’ll get back from these sites is the public-facing IP address assigned to your router. To find your private IP address on your local network, you’ll need to dig into your device’s network settings. Lifehacker lays out the steps you’ll need to follow on Windows, macOS, iOS, and Android.
Hiding your IP address with a VPN
Your IP address can reveal a lot about you. It will tell anyone your approximate geographic location, for instance, and there are plenty of reasons that you might want to mask that. One way to do so is by using a virtual private network or VPN. A VPN service can establish an encrypted tunnel across the public internet from your device to a private network hosted by the VPN provider. It’s sort of like connecting to your home network, except the network router may be halfway across the world. To external sites, your IP address will be the one assigned to your VPN host. IP addresses may not offer much by way of privacy, but VPNs offer a clever way to get around that.
VPN tunnels can also be created from the originating device and terminating on the destination device if each is equipped with compatible VPN software. Many enterprises support VPN gateways that create tunnels between themselves and remote devices that have compatible VPN software.
Copyright © 2020 IDG Communications, Inc.